package com;

import java.time.LocalDateTime;
import java.util.List;

public class Schedule {
    private String scheduleId;
    private Movie movie;
    private Hall hall;
    private LocalDateTime showTime;
    private double price;
    private List<Seat> seats;
    public Schedule(String scheduleId, Movie movie, Hall hall, LocalDateTime showTime,
                    double price, List<Seat> seats) {
        this.scheduleId = scheduleId;
        this.movie = movie;
        this.hall = hall;
        this.showTime = showTime;
        this.price = price;
        this.seats = seats;                          }
    public boolean hasSoldTickets() {
        for (Seat seat : seats) {
            if (seat.getStatus().equals("已售")) {
                return true;                     }
                                }
        return false;                }
    public String getScheduleId() { return scheduleId; }
    public Movie getMovie() { return movie; }
    public void setMovie(Movie movie) { this.movie = movie; }
    public Hall getHall() { return hall; }
    public LocalDateTime getShowTime() { return showTime; }
    public double getPrice() { return price; }
    public void setPrice(double price) { this.price = price; }
    public List<Seat> getSeats() { return seats; }
                      }
